Foxit PDF RDK
FoxitRDKNative.TaskServer Class Reference

Public Member Functions

 addTask (task)
 Adds a task to the server. More...
 
 cancelAllTasks (force)
 Cancels all tasks. More...
 
 cancelTask (task)
 Cancels a specific task. More...
 
 constructor ()
 Constructor.
 
 disableAddTask ()
 Disables the ability to add tasks. Prevents tasks from being added to the server.
 
 enableAddTask ()
 Enables the ability to add tasks. Allows tasks to be added to the server.
 
 getCurTask ()
 Retrieves the current task. More...
 
 handleTaskResult (task, isSync, addToQueue)
 Handles the result of a task. More...
 
 setMachineStatus (status)
 Sets the machine status. More...
 

Detailed Description

Class TaskServer represents a task server class.

The TaskServer class defines methods to get information about a task server.

Member Function Documentation

◆ addTask()

FoxitRDKNative.TaskServer.addTask ( task  )

Adds a task to the server.

Parameters
{Task}task - The task to be added to the server.

◆ cancelAllTasks()

FoxitRDKNative.TaskServer.cancelAllTasks ( force  )

Cancels all tasks.

Parameters
{boolean}force - If true, forces the cancellation of all tasks immediately.

◆ cancelTask()

FoxitRDKNative.TaskServer.cancelTask ( task  )

Cancels a specific task.

Parameters
{Task}task - The task to be cancelled.

◆ getCurTask()

FoxitRDKNative.TaskServer.getCurTask ( )

Retrieves the current task.

Returns
{Task} The current task being processed by the server.

◆ handleTaskResult()

FoxitRDKNative.TaskServer.handleTaskResult ( task  ,
isSync  ,
addToQueue   
)

Handles the result of a task.

Parameters
{Task}task - The task whose result is to be handled.
{boolean}isSync - If true, the task result is handled synchronously.
{boolean}addToQueue - If true, the task result is added to a queue for further processing.

◆ setMachineStatus()

FoxitRDKNative.TaskServer.setMachineStatus ( status  )

Sets the machine status.

Parameters
{number}status - The new status to be set for the machine.